package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {

    private String name;
    private int age;
    private UserDao userDao;

    public UserServiceImpl() {
    }

    public UserServiceImpl(String name, int age, UserDao userDao) {
        this.name = name;
        this.age = age;
        this.userDao = userDao;
    }
    public void setName(String name){
        this.name = name;
    }
    public  void setAge(int age){
        this.age = age;
    }
    public void setUserDao(UserDao userDao){
        this.userDao = userDao;
    }
    @Override
    public void save() {
        System.out.println("impl");
        userDao.test();
    }
}
